import { defineStore } from "pinia";

export const useUserStore = defineStore("user", {
    state: () => {
        return {
            // openId: "",
            // unionId: "",
            userInfo: {},
			token:''
        };
    },
    getters: {
        userId: (state) => state.userInfo?.id || "",
        //userPhoneNumber: (state) => state.userInfo?.phone || "",
		member:(state)=>!!state.userInfo.isMember,
    },
    actions: {},
});
